home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / Bob 1.5 Source / Bobcom.h < prev    next >
Text File  |  1991-09-26  |  2KB  |  66 lines

  1. /* bobcom.h - bob compiler definitions */
  2. /*
  3.     Copyright (c) 1991, by David Michael Betz
  4.     All rights reserved
  5. */
  6.  
  7. /* limits */
  8. #define CMAX        32767    /* code buffer size */
  9.  
  10. /* token definitions */
  11. #define T_NOTOKEN    -1
  12. #define T_EOF        0
  13.  
  14. /* non-character tokens */
  15. #define _TMIN        256
  16. #define T_STRING    256
  17. #define T_IDENTIFIER    257
  18. #define T_NUMBER    258
  19. #define T_CLASS        259
  20. #define T_STATIC    260
  21. #define T_IF        261
  22. #define T_ELSE        262
  23. #define T_WHILE        263
  24. #define T_RETURN    264
  25. #define T_FOR        265
  26. #define T_BREAK        266
  27. #define T_CONTINUE    267
  28. #define T_DO        268
  29. #define T_NEW        269
  30. #define T_NIL        270
  31. #define T_LE        271    /* '<=' */
  32. #define T_EQ        272    /* '==' */
  33. #define T_NE        273    /* '!=' */
  34. #define T_GE        274    /* '>=' */
  35. #define T_SHL        275    /* '<<' */
  36. #define T_SHR        276    /* '>>' */
  37. #define T_AND        277    /* '&&' */
  38. #define T_OR        278    /* '||' */
  39. #define T_INC        279    /* '++' */
  40. #define T_DEC        280    /* '--' */
  41. #define T_ADDEQ        281    /* '+=' */
  42. #define T_SUBEQ        282    /* '-=' */
  43. #define T_MULEQ        283    /* '*=' */
  44. #define T_DIVEQ        284    /* '/=' */
  45. #define T_REMEQ        285    /* '%=' */
  46. #define T_ANDEQ        286    /* '&=' */
  47. #define T_OREQ        287    /* '|=' */
  48. #define T_XOREQ        288    /* '^=' */
  49. #define T_SHLEQ        289    /* '<<=' */
  50. #define T_SHREQ        290    /* '>>=' */
  51. #define T_CC        291    /* '::' */
  52. #define T_MEMREF    292    /* '->' */
  53. #define _TMAX        292
  54.  
  55. /* function argument structure */
  56. typedef struct argument {
  57.     char *arg_name;        /* argument name */
  58.     struct argument *arg_next;    /* next argument */
  59. } ARGUMENT;
  60.  
  61. /* literal structure */
  62. typedef struct literal {
  63.     VALUE lit_value;        /* literal value */
  64.     struct literal *lit_next;    /* next literal */
  65. } LITERAL;
  66.